package main



import (
	"fmt"
	"sort"
)
//map sort
func main(){


	map1:=make(map[int]int,10)
	map1[0]=100
	map1[1]=200
	map1[10]=300
	map1[4]=500

	fmt.Println(map1)

	var key[]int 

	for k,_:=range map1{

		key = append(key,k)
	}
	fmt.Println(key)

	sort.Ints(key)

	fmt.Println(key)

	for _,k:=range key{
		fmt.Printf("map1[%v]=%v\n",k,map1[k])
	}

	for k,v:=range map1{
		fmt.Printf("map1 k=%v,v=%v\n",k,v)
	}

}